#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
int n,m,a[N],c[N],T,x[4],K;
int main()
{
    ios::sync_with_stdio(false);
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    scanf("%d %d",&n,&m);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    for(int i=1;i<=m;i++){
        scanf("%d",&c[i]);
    }

    for(int k1=0;;k1++){
        if(2^k1>=n){
            K=k1;
            break;
        }
    }

    scanf("%d",&T);
    for(int i=1;i<=T;i++){
        scanf("%d %d %d %d",&x[0],&x[1],&x[2],&x[3]);
    }
    return 0;
}
